import subprocess
import tkinter as tk
from tkinter import messagebox

nuitka_command: str = r'python -m nuitka --standalone --show-progress --show-memory --mingw64 --assume-yes-for-downloads --warn-implicit-exceptions --output-dir="E:\load\python\Project\VMDReversed\output" --main="E:\load\python\Project\VMDReversed\VMDReversed.py" --windows-icon-from-ico="E:\load\python\Project\NuitkaGUI\dependence\logo.ico" --enable-plugins="pyside6"'
pyinstaller_command: str = """
pyinstaller --noconfirm --onefile --console --icon "E:/load/python/Project/NuitkaGUI/assets/logo.ico"  "E:/load/python/Project/VMDReversed/VMDReversed.py"
"""

result = subprocess.run(pyinstaller_command, shell=True)

tk.Tk().withdraw()
messagebox.showinfo("提示", "编译完成！" if result.returncode == 0 else "编译失败！")
print(result)
